<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="renderer" content="webkit">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>添加/更新</title>
    <link rel="shortcut icon" href="favicon.ico">
    <link href="/admin/css/bootstrap.min14ed.css?v=3.3.6" rel="stylesheet">
    <link href="/admin/css/font-awesome.min93e3.css?v=4.4.0" rel="stylesheet">
    <link href="/admin/css/animate.min.css" rel="stylesheet">
    <link href="/admin/css/style.min862f.css?v=4.1.0" rel="stylesheet">
    <link href="/admin/frame/layer/css/layui.css" rel="stylesheet">
    <link href="/admin/frame/imgUpload/imgUpload.css" rel="stylesheet">

</head>
<body>
<div class="container-fluid" style="margin-top: 30px;">
    <div class="row">
        <div class="col-sm-12 col-md-12">
            <form class="form-horizontal" id="addForm" action="/Admin/App/AppBanner/addOrUpdate">
                <c:if test="${isUpdate==true}">
                    <div class="form-group hidden">
                        <label class="col-sm-2 control-label"><span style="color: red">*</span>编号：</label>
                        <div class="col-sm-6">
                            <input name="id" value="${obj.id}" class="form-control">
                        </div>
                    </div>
                </c:if>

                        <div class="form-group">
                            <label class="col-sm-2 control-label"><span style="color: red">*</span>标题：</label>
                            <div class="col-sm-6">
                                    <input required name="title" minlength="0" maxlength="32" type="text"  value="${obj.title}" class="form-control" placeholder="请输入标题">
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-2 control-label"><span style="color: red">*</span>URL：</label>
                            <div class="col-sm-6">
                                    <input required name="href" minlength="0" maxlength="255" type="text"  value="${obj.href}" class="form-control" placeholder="请输入URL">
                            </div>
                        </div>


                        <div class="form-group">
                            <label class="col-sm-2 control-label"><span style="color: red">*</span>图片：</label>
                            <div class="col-sm-10">
                                <div class="imgupload-wrap" img-count="1" img-name="imgAddress">
                                    <input type="text" value="${obj.imgAddress}">
                                </div>
                            </div>
                        </div>
                <c:if test="${isUpdate==true}">

                    <div class="form-group">
                        <label class="col-sm-2 control-label"><span style="color: red">*</span>创建时间：</label>
                        <div class="col-sm-6">
                            <p class="form-control-static">
                                <input ${isUpdate==true?"disabled":""} required name="createTime" type="datetime"
                                                                       value=" <fmt:formatDate value="${obj.createTime}" pattern="yyyy-MM-dd hh:mm:ss" />"
                                                                       class="form-control" placeholder="请输入创建时间">
                        </div>
                    </div>

                </c:if>


            </form>
        </div>
    </div>
</div>

</body>
<script src="/admin/frame/jquery/jquery-1.9.1.min.js"></script>
<script src="/admin/frame/bootstrap/js/bootstrap.min.js"></script>
<script src="/admin/js/content.min.js?v=1.0.0"></script>
<script src="/admin/frame/jquery-validate/jquery.validate.min.js"></script>
<script src="/admin/frame/jquery-validate/messages_zh.min.js"></script>
<script src="/admin/frame/imgUpload/imgUpload.js"></script>
<script>

    $().ready(function() {
        $("#addForm").validate();
    });
</script>
</html>
